package com.woniu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 充电桩表
 * @TableName charger
 */
@TableName(value ="charger")
@Data
public class Charger implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 充电站id
     */
    private Long stationId;

    /**
     * 充电桩编号
     */
    private String chargerNumber;

    /**
     * 充电桩名称
     */
    private String chargerName;

    /**
     * 充电桩类别（汽车充电桩）
     */
    private String chargerCategory;

    /**
     * 充电桩类型（直流、交流）
     */
    private String chargerType;

    /**
     * 充电功率
     */
    private BigDecimal chargingPower;

    /**
     * 当前状态
     */
    private String currentStatus;

    /**
     * 安装位置
     */
    private String installationLocation;

    /**
     * 通讯信号
     */
    private String communicationSignal;

    /**
     * 描述
     */
    private String description;

    /**
     * 图片
     */
    private String imageUrl;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Charger other = (Charger) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStationId() == null ? other.getStationId() == null : this.getStationId().equals(other.getStationId()))
            && (this.getChargerNumber() == null ? other.getChargerNumber() == null : this.getChargerNumber().equals(other.getChargerNumber()))
            && (this.getChargerName() == null ? other.getChargerName() == null : this.getChargerName().equals(other.getChargerName()))
            && (this.getChargerCategory() == null ? other.getChargerCategory() == null : this.getChargerCategory().equals(other.getChargerCategory()))
            && (this.getChargerType() == null ? other.getChargerType() == null : this.getChargerType().equals(other.getChargerType()))
            && (this.getChargingPower() == null ? other.getChargingPower() == null : this.getChargingPower().equals(other.getChargingPower()))
            && (this.getCurrentStatus() == null ? other.getCurrentStatus() == null : this.getCurrentStatus().equals(other.getCurrentStatus()))
            && (this.getInstallationLocation() == null ? other.getInstallationLocation() == null : this.getInstallationLocation().equals(other.getInstallationLocation()))
            && (this.getCommunicationSignal() == null ? other.getCommunicationSignal() == null : this.getCommunicationSignal().equals(other.getCommunicationSignal()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getImageUrl() == null ? other.getImageUrl() == null : this.getImageUrl().equals(other.getImageUrl()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStationId() == null) ? 0 : getStationId().hashCode());
        result = prime * result + ((getChargerNumber() == null) ? 0 : getChargerNumber().hashCode());
        result = prime * result + ((getChargerName() == null) ? 0 : getChargerName().hashCode());
        result = prime * result + ((getChargerCategory() == null) ? 0 : getChargerCategory().hashCode());
        result = prime * result + ((getChargerType() == null) ? 0 : getChargerType().hashCode());
        result = prime * result + ((getChargingPower() == null) ? 0 : getChargingPower().hashCode());
        result = prime * result + ((getCurrentStatus() == null) ? 0 : getCurrentStatus().hashCode());
        result = prime * result + ((getInstallationLocation() == null) ? 0 : getInstallationLocation().hashCode());
        result = prime * result + ((getCommunicationSignal() == null) ? 0 : getCommunicationSignal().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getImageUrl() == null) ? 0 : getImageUrl().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", stationId=").append(stationId);
        sb.append(", chargerNumber=").append(chargerNumber);
        sb.append(", chargerName=").append(chargerName);
        sb.append(", chargerCategory=").append(chargerCategory);
        sb.append(", chargerType=").append(chargerType);
        sb.append(", chargingPower=").append(chargingPower);
        sb.append(", currentStatus=").append(currentStatus);
        sb.append(", installationLocation=").append(installationLocation);
        sb.append(", communicationSignal=").append(communicationSignal);
        sb.append(", description=").append(description);
        sb.append(", imageUrl=").append(imageUrl);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}